package com.itheima.innerclass;

public class Outer {

    private String name;
    public void run() {

    }

    public static double PI = 3.14;
    public static void go() {

    }

    public class Inner {

        private int num;

        public Inner() {
        }

        public Inner(int num) {
            this.num = num;
        }

        public int getNum() {
            return num;
        }

        public void setNum(int num) {
            this.num = num;
        }

        public void show() {

            System.out.println("show()");
            //1. 成员内部类可以直接访问外部类中的静态成员，
            System.out.println(PI);
            go();

            //也可以访问外部类中的实例成员
            System.out.println(name);
            run();

            //当前寄生的外部类对象
            System.out.println(Outer.this);
        }
    }
}
